package com.ken.algorithms.linkedList;

import com.ken.entity.Entity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;


/**
 * <ul>
 * <li>Title: LC138</li>
 * <li>Description: TODO </li>
 * </ul>
 *
 * @author 程序员ken
 * @date 2021/6/27 13:35
 */
public class LC138 {

    public static void main(String[] args) {
        Entity entity1 =new Entity("遥远的救世主","左倾", "1");
        Entity  entity2 =new Entity("平凡的世界","路遥", "1");
        Entity  entity3 =new Entity("活着","福贵", "1");

        List<Entity> list = new ArrayList<Entity>();
        list.add(entity1);
        list.add(entity2);
        list.add(entity3);

        HashMap<Entity,String> hashMap = new HashMap<Entity,String>();
        Entity entity =list.get(0);
        /*list.forEach((item)->{
            hashMap.put(item,"");
        });*/

        hashMap.put(entity,"");

        for (int i1 = 1; i1 < list.size(); i1++) {
            entity =list.get(i1);
            hashMap.put(entity,"");
        }

        System.out.println("");
    }
}
